val _ = "foo" : String.string;
val _ = #"x" : String.char;
val _ = size : string -> int;
val _ = String.size : string -> int;
val 0 = String.size "";
val 3 = String.size "foo";
val _ = String.sub : string * int -> char;
val #"f" = String.sub ("foo", 0);
val #"o" = String.sub ("foo", 1);
val #"o" = String.sub ("foo", 2);
(String.sub ("foo", ~1); print "Bad\n") handle Subscript => print "Good\n";
(String.sub ("foo", 3); print "Bad\n") handle Subscript => print "Good\n";
val _ = String.^ : string * string -> string;
print ("Hello " ^ "world!\n");
val _ = String.concat : string list -> string;
print (String.concat ["Standard ", "ML", "\n"]);
val _ = String.concatWith : string -> string list -> string;
print (String.concatWith "," ("foo" :: "bar" :: "baz" :: "\n" :: nil));
val _ = str : char -> string;
val _ = String.str : char -> string;
print (String.str #"x" ^ "\n");
val _ = String.implode : char list -> string;
print (String.implode [#"i", #"m", #"p", #"l", #"o", #"d", #"e", #"\n"]);
val _ = String.explode : string -> char list;
print (String.concatWith "." (List.map String.str (String.explode "xyz")) ^ "\n");
val _ = String.map : (char -> char) -> string -> string;
print (String.map (fn #"e" => #"3" | #"l" => #"1" | #"o" => #"0" | x => x) "Hello world!\n");
val _ = String.translate : (char -> string) -> string -> string;
print (String.translate (fn #"H" => "|-|" | #"e" => "3" | #"l" => "|" | #"w" => "vv" | x => str x) "Hello world!\n");
